{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# matplotlib 测试"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "plt.subplots（）一纸多图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x2320c20ad30>]"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "<Figure size 864x864 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD8CAYAAACfF6SlAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAeZ0lEQVR4nO3de3zU9Z3v8ddHIlipIAKlFNKGEAwisB4Igm1X7doW8EGhW6hHtq3S1UM9xu3Z9uwqp93WW7vFdvfY9uApD0Qr9pwiLt7iJfFSi/ZqCD0YEhWJEISIkoCl3ggQPueP+QWHYTLJZO7zez8fj3k4v8sMny9v5zMzv/n9vpi7IyIi4XJSrgsQEZHsU/MXEQkhNX8RkRBS8xcRCSE1fxGREFLzFxEJITV/wczuNLO9ZtbUw3Yzs5+aWYuZNZrZtGzXKP2jbKUnav4CcBcwJ8H2ucCE4LYU+FkWapL0uAtlK3Go+Qvu/iywP8EuC4C7PeKPwOlmNjo71UkqlK30pKS3HczsTmAesNfdJwfrzgDWAWVAK3CJu79pZgb8BLgYeBdY4u5/6u3PGDFihJeVlfVzCJIOkydPpqWlBTNrd/eRMZvHALuilncH6/bEPo+ZLSXyCZLBgwdPnzhxYqZKlj6aPHkyTU1NXT1s7lO2yjU/bdq0qSPO67VPem3+RL42rgDujlq3DPiVuy83s2XB8nUc/xVyJpGv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+ISAip+YuIhJCav4hICKn5i4iEkJq/iEgIqfmLiITQ/wdInl6bBm2flAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 9 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib.dates as mdate\n",
    "import matplotlib as mpl\n",
    "\n",
    "x = np.arange(0, 100)\n",
    "\n",
    "fig = plt.figure(figsize=(12,12), facecolor='blue') # 定义画布的大小\n",
    "\n",
    "#划分子图\n",
    "\n",
    "fig,axes = plt.subplots(3,3) # 定义子区间的个数，注意第一个fig后面是逗号\n",
    "\n",
    "ax1 = axes[0, 0] #第一个图位置\n",
    "\n",
    "ax2 = axes[0, 1] #第二个图位置\n",
    "\n",
    "ax3 = axes[1, 0] #第三个图位置\n",
    "\n",
    "ax4 = axes[1, 1] #第四个图位置\n",
    "\n",
    "#作图1\n",
    "ax1.plot(x, x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "双Y坐标轴画图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "fig = plt.figure(figsize=(14,9))\n",
    "ax1 = fig.add_subplot(111)\n",
    "ax1.xaxis.set_major_formatter(mdate.DateFormatter('%Y-%m-%d'))  # 设置时间标签显示格式\n",
    "ax1.plot(df['index'], df['left'] ,)\n",
    "ax1.set_ylabel(l_tittle ,fontdict={'weight': 'normal', 'size': 15})\n",
    "ax1.set_title(title ,fontdict={'weight': 'normal', 'size': 15})\n",
    "\n",
    "ax2 = ax1.twinx()  # this is the important function\n",
    "ax2.plot(df['index'], df['right'], 'r') # 拥挤率用红色标记\n",
    "ax2.set_ylabel(r_tittle ,fontdict={'weight': 'normal', 'size': 15})\n",
    "ax2.set_xlabel('Same')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
